package com.ebt.m.proposal_v2.helper;

import android.content.Context;

/**
 * Js调用Native基类
 *
 * @author archer.qi
 *         Created on 2017/6/2.
 */
public class NativeAPI {
    public Context mContext;
    public static JSResponse mJSResponse;

    public static class JSResponse {
        /**
         * Native调用Js
         * API < 19时, 默认是接收不到返回值的;
         * 因此采用请求完成后，Js调用callResponse
         */
        public String methodName;
        public String response;
    }


    public NativeAPI(Context context) {
        mContext = context;
    }

    /**
     * Native调用Js-Method后，通过该方法获取调用结果
     *
     * @return
     */
    public static JSResponse getJavascriptCallResponse() {
        return mJSResponse;
    }

}
